Report post
How do I add a custom attribute in react 16?
Custom attributes are supported natively in React 16. This means that adding a custom attribute to an element is now as simple as adding it to a render function, like so: render () { return ( ); } Custom attributes are currently not supported.How do I remove attributes from jQuery?
You can do this with jQuery's .attr function, which will set attributes. Removing them is done via the .removeAttr function. //.attr () $ ("element").attr ("id", "newId"); $ ("element").attr ("disabled", true); //.removeAttr () $ ("element").removeAttr ("id"); $ ("element").removeAttr ("disabled"); Bonus for including the remove function!What happens if a given attribute does not exist?
If the given attribute does not exist, the value returned will either be null or "" (the empty string); see Non-existing attributes for details. attributeName is the name of the attribute whose value you want to get. A string containing the value of attributeName.Why does ReactJS not update ARIA/data attributes?
This means the component has f.e. aria-modal=true, you push the changes (to false) to the store of aria/data attributes, but nothing else is changed (such as component's content or class or variables in there) as the result ReactJs will not update aria/data attrs in that components. I've been messing around about whole day to realise that.